package com.xy.async.service.impl;

import com.xy.async.annotation.AsyncExec;
import com.xy.async.enums.AsyncTypeEnum;
import com.xy.async.service.HelloService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class HelloServiceImpl implements HelloService {

    @Override
    @AsyncExec(type = AsyncTypeEnum.ASYNC_SAVE, remark = "反对sa")
    public String helloService(){
        throw new RuntimeException("fsda");
        //return "helloService";
    }

    @Override
    @Transactional
    public int add() {
        return 0;
    }
}
